﻿@model List<Admin.Models.ProductModel>

@{
    ViewBag.Title = "editProduct";
     Layout = "~/Views/Shared/_LayoutAdmin.cshtml";

}


@foreach(var id in Model)
{
    using (Html.BeginForm("Edit", "ProductAdmin", new { id = @id.MASP }))
{
    @Html.AntiForgeryToken()

    <div class="formtable" style="float:left;margin-left:50px; margin-top:20px; text-align:center;">

        <h3 style="text-align:center;">Sửa Sản Phẩm @id.TENSP</h3>
        <hr />
        @Html.ValidationSummary(true)
        <dl class="dl-horizontal">

            <dt>
                <label>Mã sản phẩm</label>
            </dt>
            <dd>
                <label>@id.MASP</label>

            </dd>

            <dt>
                <label>Tên sản phẩm</label>
            </dt>

            <dd>
                <input type="text" value="@id.TENSP" name="tensp" />

            </dd>

            <dt>
                <label>Giá sản phẩm</label>
            </dt>
            <dd>
                <input type="text" value="@id.GIA" name="gia" />
                @Html.ValidationMessageFor(model => id.GIA)
            </dd>
        </dl>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
                @Html.ActionLink("Quay lại danh sách", "Product", "ProductAdmin")
            </div>

        </div>
    </div>
}
}

